import { axios } from '@/utils/request'

export const getRolePage = (params) => {
  return axios({
    url: 'role',
    method: 'get',
    params
  })
}

export const getRoleById = (id) => {
  return axios({
    url: 'role/' + id,
    method: 'get'
  })
}

export const saveRole = (data) => {
  return axios({
    url: 'role',
    method: 'post',
    data
  })
}

export const updateRoleById = (id, data) => {
  return axios({
    url: 'role/' + id,
    method: 'put',
    data
  })
}

export const removeRoleById = (id) => {
  return axios({
    url: 'role/' + id,
    method: 'delete'
  })
}
